CREATE EXTERNAL TABLE jms_tmp.tmp_in_port_forecast_warning_billcode_detail_hi(
  taking_date date COMMENT '揽收日期',
  billcode string COMMENT '单号明细',
  arrival_regional_id string COMMENT '到车大区id',
  arrival_regional_desc string COMMENT '到车大区',
  arrival_provider_id string COMMENT '到车省份id',
  arrival_provider_desc string COMMENT '到车省份',
  arrival_agent_code string COMMENT '到车代理区',
  arrival_agent_name string COMMENT '到车代理区名称',
  arrival_code string COMMENT '到车网点',
  arrival_network_type int COMMENT '到车网点类型',
  arrival_name string COMMENT '到车网点',
  send_code string COMMENT '发车网点编码',
  send_name string COMMENT '发车网点名称',
  date_type string COMMENT '数据类型：中转、同城、进港',
  line_name string COMMENT '线路名称',
  vehicle_typegroupe string COMMENT '车型',
  shipment_business_attribute string COMMENT '任务号业务属性',
  planned_arrival_time timestamp COMMENT '规划到达时间',
  estimate_arrival_time timestamp COMMENT '计划到达时间',
  actual_arrival_time timestamp COMMENT '实际到达时间',
  plan_diffuse_shift string COMMENT '规划散货班次',
  actual_diffuse_shift string COMMENT '实际散货班次',
  predict_join_duration decimal(10,2) COMMENT '预估衔接时长',
  unload_scan_time timestamp COMMENT '卸车到件时间',
  package_inside_charge_weight decimal(10,2) COMMENT '内部计费重量',
  shipment_no string COMMENT '任务号',
  update_time timestamp COMMENT '更新时间',
  load_scan_time timestamp COMMENT '装车扫描时间',
  is_trunk_branch int COMMENT '支干线：1-干线；2-支线',
  plan_diffuse_shift_code string COMMENT '规划散货编码')
COMMENT '进出港预测预警_进港单号明细'
PARTITIONED BY (
  dt string COMMENT '规划发车日期')
LOCATION '/dw/hive/jms_tmp.db/external/tmp_in_port_forecast_warning_billcode_detail_hi'
TBLPROPERTIES (
    'discover.partitions' = 'false',
    'parquet.column.index.access' = 'true'
);

----进港件线路明细
CREATE EXTERNAL TABLE jms_dm.dm_in_port_forecast_warning_line_detail_dt(
  planned_arrival_date date COMMENT '规划到车日期',
  arrival_regional_id string COMMENT '到车网点所属大区id',
  arrival_regional_desc string COMMENT '到车网点所属大区',
  arrival_provider_id string COMMENT '到车网点所属省id',
  arrival_provider_desc string COMMENT '到车网点所属省',
  arrival_agent_code string COMMENT '到车网点所属代理区编码',
  arrival_agent_name string COMMENT '到车网点所属代理区名称',
  arrival_code string COMMENT '到车网点编码',
  arrival_name string COMMENT '到车网点名称',
  arrival_network_type string COMMENT '到车网点类型',
  send_code string COMMENT '发车网点编码',
  send_name string COMMENT '发车车网点名称',
  data_type string COMMENT '类型：出港 同城 中转',
  line_name string COMMENT '线路名称',
  vehicle_typegroup string COMMENT '车型',
  shipment_no string COMMENT '任务号',
  shipment_business_attribute string COMMENT '任务属性',
  planned_arrival_time timestamp COMMENT '规划到车时间',
  estimate_arrival_time timestamp COMMENT '计划到车时间',
  shipment_actual_departure_time timestamp COMMENT '任务号实际到车时间',
  plan_diffuse_shift string COMMENT '规划散货班次',
  actual_diffuse_shift string COMMENT '实际散货班次',
  predict_join_duration int COMMENT '预估衔接时长',
  shipment_unloading_waybill_cnt int COMMENT '线路实际卸车-票数',
  shipment_unloading_waybill_weight decimal(16,2) COMMENT '线路实际卸车重量',
  forecast_unloading_waybill_cnt int COMMENT '线路预估卸车-票数',
  forecast_unloading_waybill_weight decimal(16,2) COMMENT '线路预估卸车重量',
  update_time timestamp COMMENT '更新时间',
  is_trunk_branch int COMMENT '支干线：1-干线；2-支线',
  plan_diffuse_shift_code string COMMENT '规划散货班次',
  load_unloading_waybill_cnt int COMMENT '单号匹配单量')
COMMENT '进出港预测预警_进港线路明细'
PARTITIONED BY (
  dt string COMMENT '规划到车时间')
LOCATION '/dw/hive/jms_dm.db/external/dm_in_port_forecast_warning_line_detail_dt'
TBLPROPERTIES (
    'discover.partitions' = 'false',
    'parquet.column.index.access' = 'true'
);